package com.woniuxy.core.util;

public class RedisKeyUtil {


   public static String registerCodeKey(String phone)throws Exception{
        return "register:phone:"+phone;
   }

    /**
     * 记录密码错误次数
     */
   public static String passWordError(String account)throws Exception{
       return "errorPass:account:"+account;
   }

    /**
     * 密码错误次数达到上限，一小时内不允许登录的账号
     */
    public static String cannotLogin(String account)throws Exception{
        return "cannotLogin:account:"+account;
    }

   //设置为1分钟的时间判断在一分钟内重复发送
   public static String sendRegisterCodeInMinute(String phone)throws Exception{
       return "register:phone:inTime:"+phone;
   }

   //记录用户注册时发送验证码次数
    public static String codeTotalInHour(String phone)throws Exception{
       return "code:total:"+phone;
    }
    public static String codeTotalInHour1(String phone)throws Exception{
        return "code:total:"+phone;
    }
    public static String erroTotal(String phone)throws Exception{
        return "erro:total:"+phone;
    }
    public static String lockPhone(String phone){
       return "lock:phone:"+phone;
    }
    public static String lockUserName(String userName){
        return "lock:username:"+userName;
    }
}
